<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script type="text/javascript">
    var arr = new Array();
    arr[2] = 1
    arr[3] = 5
    arr[50]=23
    for(var i=0;i<arr.length;i++){
        console.log(arr[i])
    }

    var stus=[
        {'name':'lisi'},
        {'name':'wangwu'},
        {'name':'sunliu'}
    ]
    for(var i=0;i<stus.length;i++){
        console.log(stus[i])
    }
</script>
</body>
</html>